
import request from "@/request";
import ApiResponse from "../common/api-response.ts";
import { UserInfoResponseType,UserBalanceType } from "./type-user";

export default class UserApi {
  async getUserInfo(): Promise<ApiResponse<UserInfoResponseType>> {
    return ApiResponse.fromResponse(await request.get("/userInfo/get"));
  }

  // 获取用户余额
  async getUserBalance(): Promise<ApiResponse<UserBalanceType>> {
    return ApiResponse.fromResponse(await request.get("/account/balance", {}));
  }
}
